/* Copyright 2018 JDCLOUD.COM

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http:#www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Attack Log APIs
Anti DDoS Basic Attack Log APIs

OpenAPI spec version: v1
Contact: 

NOTE: This class is auto generated by the jdcloud code generator program.
*/

#import <Foundation/Foundation.h>
#import <JDCloudOCSDKBaseanti/BaseantiApiModel.h>


@implementation BaseantiDescribeIpResourceProtectInfoRequest
-(id) initWithRegion:(NSString *)regionId
start:(NSNumber*)start
limit:(NSNumber*)limit
ip:(NSString*)ip { 
    self.regionId = regionId;
    self.start = start;
    self.limit = limit;
    self.ip = ip;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
start:(NSNumber*)start
limit:(NSNumber*)limit
ip:(NSString*)ip { 
    self.regionId = regionId;
    self.version = version;
    self.start = start;
    self.limit = limit;
    self.ip = ip;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self start])
    {
        [result setValue:[self start] forKey:@"start"];
    }
    if([self limit])
    {
        [result setValue:[self limit] forKey:@"limit"];
    }
    if([self ip])
    {
        [result setValue:[self ip] forKey:@"ip"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.start = [dictionary objectForKey:@"start"];
    self.limit = [dictionary objectForKey:@"limit"];
    self.ip = [dictionary objectForKey:@"ip"];
    return self;
} 

@end
@implementation BaseantiDescribeCpsIpResourcesRequest
-(id) initWithRegion:(NSString *)regionId
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize { 
    self.regionId = regionId;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize { 
    self.regionId = regionId;
    self.version = version;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self pageNumber])
    {
        [result setValue:[self pageNumber] forKey:@"pageNumber"];
    }
    if([self pageSize])
    {
        [result setValue:[self pageSize] forKey:@"pageSize"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.pageNumber = [dictionary objectForKey:@"pageNumber"];
    self.pageSize = [dictionary objectForKey:@"pageSize"];
    return self;
} 

@end
@implementation BaseantiDescribeIpResourcesRequest
-(id) initWithRegion:(NSString *)regionId
ip:(NSString*)ip { 
    self.regionId = regionId;
    self.ip = ip;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
ip:(NSString*)ip { 
    self.regionId = regionId;
    self.version = version;
    self.ip = ip;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self ip])
    {
        [result setValue:[self ip] forKey:@"ip"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.ip = [dictionary objectForKey:@"ip"];
    return self;
} 

@end
@implementation BaseantiDescribeIpCleanThresholdRangeRequest
-(id) initWithRegion:(NSString *)regionId
ip:(NSString*)ip { 
    self.regionId = regionId;
    self.ip = ip;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
ip:(NSString*)ip { 
    self.regionId = regionId;
    self.version = version;
    self.ip = ip;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self ip])
    {
        [result setValue:[self ip] forKey:@"ip"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.ip = [dictionary objectForKey:@"ip"];
    return self;
} 

@end
@implementation BaseantiDescribeIpResourceFlowRequest
-(id) initWithRegion:(NSString *)regionId
endTime:(NSString*)endTime
ip:(NSString*)ip { 
    self.regionId = regionId;
    self.endTime = endTime;
    self.ip = ip;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
endTime:(NSString*)endTime
ip:(NSString*)ip { 
    self.regionId = regionId;
    self.version = version;
    self.endTime = endTime;
    self.ip = ip;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self endTime])
    {
        [result setValue:[self endTime] forKey:@"endTime"];
    }
    if([self ip])
    {
        [result setValue:[self ip] forKey:@"ip"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.endTime = [dictionary objectForKey:@"endTime"];
    self.ip = [dictionary objectForKey:@"ip"];
    return self;
} 

@end
@implementation BaseantiDescribeElasticIpResourcesRequest
-(id) initWithRegion:(NSString *)regionId
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize { 
    self.regionId = regionId;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize { 
    self.regionId = regionId;
    self.version = version;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self pageNumber])
    {
        [result setValue:[self pageNumber] forKey:@"pageNumber"];
    }
    if([self pageSize])
    {
        [result setValue:[self pageSize] forKey:@"pageSize"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.pageNumber = [dictionary objectForKey:@"pageNumber"];
    self.pageSize = [dictionary objectForKey:@"pageSize"];
    return self;
} 

@end
@implementation BaseantiSetIpCleanThresholdResult
-(id) initWithCode:(NSNumber*) code
        message:(NSString*)message { 
    self.code = code;               
    self.message = message;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self code])
    {
        [result setValue:[self code] forKey:@"code"];
    }
    if([self message])
    {
        [result setValue:[self message] forKey:@"message"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.code = [dictionary objectForKey:@"code"];
    self.message = [dictionary objectForKey:@"message"];
    return self;
} 

@end
@implementation BaseantiDescribeCcsIpResourcesRequest
-(id) initWithRegion:(NSString *)regionId
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize { 
    self.regionId = regionId;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize { 
    self.regionId = regionId;
    self.version = version;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self pageNumber])
    {
        [result setValue:[self pageNumber] forKey:@"pageNumber"];
    }
    if([self pageSize])
    {
        [result setValue:[self pageSize] forKey:@"pageSize"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.pageNumber = [dictionary objectForKey:@"pageNumber"];
    self.pageSize = [dictionary objectForKey:@"pageSize"];
    return self;
} 

@end
@implementation BaseantiDescribeIpSafetyInfoRequest
-(id) initWithRegion:(NSString *)regionId
ip:(NSString*)ip { 
    self.regionId = regionId;
    self.ip = ip;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
ip:(NSString*)ip { 
    self.regionId = regionId;
    self.version = version;
    self.ip = ip;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self ip])
    {
        [result setValue:[self ip] forKey:@"ip"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.ip = [dictionary objectForKey:@"ip"];
    return self;
} 

@end
@implementation BaseantiDescribeIpResourceInfoRequest
-(id) initWithRegion:(NSString *)regionId
ip:(NSString*)ip { 
    self.regionId = regionId;
    self.ip = ip;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
ip:(NSString*)ip { 
    self.regionId = regionId;
    self.version = version;
    self.ip = ip;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self ip])
    {
        [result setValue:[self ip] forKey:@"ip"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.ip = [dictionary objectForKey:@"ip"];
    return self;
} 

@end
@implementation BaseantiDescribeIpMonitorFlowRequest
-(id) initWithRegion:(NSString *)regionId
startTime:(NSString*)startTime
endTime:(NSString*)endTime
ip:(NSArray<NSString*>*)ip { 
    self.regionId = regionId;
    self.startTime = startTime;
    self.endTime = endTime;
    self.ip = ip;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
startTime:(NSString*)startTime
endTime:(NSString*)endTime
ip:(NSArray<NSString*>*)ip { 
    self.regionId = regionId;
    self.version = version;
    self.startTime = startTime;
    self.endTime = endTime;
    self.ip = ip;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self startTime])
    {
        [result setValue:[self startTime] forKey:@"startTime"];
    }
    if([self endTime])
    {
        [result setValue:[self endTime] forKey:@"endTime"];
    }
    if([self ip])
    {
        [result setValue:[self ip] forKey:@"ip"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.startTime = [dictionary objectForKey:@"startTime"];
    self.endTime = [dictionary objectForKey:@"endTime"];
    self.ip = [dictionary objectForKey:@"ip"];
    return self;
} 

@end
@implementation BaseantiDescribeAttackTypeCountRequest
-(id) initWithRegion:(NSString *)regionId
startTime:(NSString*)startTime
endTime:(NSString*)endTime
ip:(NSArray<NSString*>*)ip { 
    self.regionId = regionId;
    self.startTime = startTime;
    self.endTime = endTime;
    self.ip = ip;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
startTime:(NSString*)startTime
endTime:(NSString*)endTime
ip:(NSArray<NSString*>*)ip { 
    self.regionId = regionId;
    self.version = version;
    self.startTime = startTime;
    self.endTime = endTime;
    self.ip = ip;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self startTime])
    {
        [result setValue:[self startTime] forKey:@"startTime"];
    }
    if([self endTime])
    {
        [result setValue:[self endTime] forKey:@"endTime"];
    }
    if([self ip])
    {
        [result setValue:[self ip] forKey:@"ip"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.startTime = [dictionary objectForKey:@"startTime"];
    self.endTime = [dictionary objectForKey:@"endTime"];
    self.ip = [dictionary objectForKey:@"ip"];
    return self;
} 

@end
@implementation BaseantiDescribeAttackStatisticsRequest
-(id) initWithRegion:(NSString *)regionId
startTime:(NSString*)startTime
endTime:(NSString*)endTime
ip:(NSArray<NSString*>*)ip { 
    self.regionId = regionId;
    self.startTime = startTime;
    self.endTime = endTime;
    self.ip = ip;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
startTime:(NSString*)startTime
endTime:(NSString*)endTime
ip:(NSArray<NSString*>*)ip { 
    self.regionId = regionId;
    self.version = version;
    self.startTime = startTime;
    self.endTime = endTime;
    self.ip = ip;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self startTime])
    {
        [result setValue:[self startTime] forKey:@"startTime"];
    }
    if([self endTime])
    {
        [result setValue:[self endTime] forKey:@"endTime"];
    }
    if([self ip])
    {
        [result setValue:[self ip] forKey:@"ip"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.startTime = [dictionary objectForKey:@"startTime"];
    self.endTime = [dictionary objectForKey:@"endTime"];
    self.ip = [dictionary objectForKey:@"ip"];
    return self;
} 

@end
@implementation BaseantiDescribeAttackLogsRequest
-(id) initWithRegion:(NSString *)regionId
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize
startTime:(NSString*)startTime
endTime:(NSString*)endTime
ip:(NSArray<NSString*>*)ip { 
    self.regionId = regionId;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    self.startTime = startTime;
    self.endTime = endTime;
    self.ip = ip;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize
startTime:(NSString*)startTime
endTime:(NSString*)endTime
ip:(NSArray<NSString*>*)ip { 
    self.regionId = regionId;
    self.version = version;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    self.startTime = startTime;
    self.endTime = endTime;
    self.ip = ip;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self pageNumber])
    {
        [result setValue:[self pageNumber] forKey:@"pageNumber"];
    }
    if([self pageSize])
    {
        [result setValue:[self pageSize] forKey:@"pageSize"];
    }
    if([self startTime])
    {
        [result setValue:[self startTime] forKey:@"startTime"];
    }
    if([self endTime])
    {
        [result setValue:[self endTime] forKey:@"endTime"];
    }
    if([self ip])
    {
        [result setValue:[self ip] forKey:@"ip"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.pageNumber = [dictionary objectForKey:@"pageNumber"];
    self.pageSize = [dictionary objectForKey:@"pageSize"];
    self.startTime = [dictionary objectForKey:@"startTime"];
    self.endTime = [dictionary objectForKey:@"endTime"];
    self.ip = [dictionary objectForKey:@"ip"];
    return self;
} 

@end
@implementation BaseantiDescribeAttackStatisticsResult
-(id) initWithAttackCount:(NSNumber*) attackCount
        blackHoleCount:(NSNumber*)blackHoleCount
        peak:(NSNumber*)peak
        unit:(NSString*)unit { 
    self.attackCount = attackCount;               
    self.blackHoleCount = blackHoleCount;               
    self.peak = peak;               
    self.unit = unit;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self attackCount])
    {
        [result setValue:[self attackCount] forKey:@"attackCount"];
    }
    if([self blackHoleCount])
    {
        [result setValue:[self blackHoleCount] forKey:@"blackHoleCount"];
    }
    if([self peak])
    {
        [result setValue:[self peak] forKey:@"peak"];
    }
    if([self unit])
    {
        [result setValue:[self unit] forKey:@"unit"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.attackCount = [dictionary objectForKey:@"attackCount"];
    self.blackHoleCount = [dictionary objectForKey:@"blackHoleCount"];
    self.peak = [dictionary objectForKey:@"peak"];
    self.unit = [dictionary objectForKey:@"unit"];
    return self;
} 

@end
@implementation BaseantiDescribeIpResourceFlowResult
-(id) initWithBps:(IpResourceFlow*) bps
        pps:(IpResourceFlow*)pps { 
    self.bps = bps;               
    self.pps = pps;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self bps])
    {
        [result setValue:[[self bps] dictionary]forKey:@"bps"];
    }
    if([self pps])
    {
        [result setValue:[[self pps] dictionary]forKey:@"pps"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.bps = [[IpResourceFlow alloc]initWithDic:[dictionary objectForKey:@"bps"]];
    self.pps = [[IpResourceFlow alloc]initWithDic:[dictionary objectForKey:@"pps"]];
    return self;
} 

@end
  
@implementation BaseantiDescribeIpResourceFlowResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
BaseantiDescribeIpResourceFlowResult* result = [[BaseantiDescribeIpResourceFlowResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(BaseantiDescribeIpResourceFlowResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation BaseantiSetIpCleanThresholdResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
BaseantiSetIpCleanThresholdResult* result = [[BaseantiSetIpCleanThresholdResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(BaseantiSetIpCleanThresholdResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation BaseantiSetCleanThresholdResult
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
  
@implementation BaseantiSetCleanThresholdResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
BaseantiSetCleanThresholdResult* result = [[BaseantiSetCleanThresholdResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(BaseantiSetCleanThresholdResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation BaseantiDescribeCpsIpResourcesResult
-(id) initWithDataList:(NSArray<IpResource*>*) dataList
        currentCount:(NSNumber*)currentCount
        totalCount:(NSNumber*)totalCount
        totalPage:(NSNumber*)totalPage { 
    self.dataList = dataList;               
    self.currentCount = currentCount;               
    self.totalCount = totalCount;               
    self.totalPage = totalPage;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self dataList])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self dataList] count]; i++) {
            IpResource* item = [[self dataList] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"dataList"];
    }
    if([self currentCount])
    {
        [result setValue:[self currentCount] forKey:@"currentCount"];
    }
    if([self totalCount])
    {
        [result setValue:[self totalCount] forKey:@"totalCount"];
    }
    if([self totalPage])
    {
        [result setValue:[self totalPage] forKey:@"totalPage"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* dataListArray = [dictionary objectForKey:@"dataList"];
    if(dataListArray&&![dataListArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [dataListArray count];i++)
        {
        IpResource* item = [[IpResource alloc]initWithDic:[dataListArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.dataList = propertyArray;
    }
    self.currentCount = [dictionary objectForKey:@"currentCount"];
    self.totalCount = [dictionary objectForKey:@"totalCount"];
    self.totalPage = [dictionary objectForKey:@"totalPage"];
    return self;
} 

@end
  
@implementation BaseantiDescribeCpsIpResourcesResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
BaseantiDescribeCpsIpResourcesResult* result = [[BaseantiDescribeCpsIpResourcesResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(BaseantiDescribeCpsIpResourcesResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation BaseantiDescribeIpCleanThresholdRangeResult
-(id) initWithData:(IpCleanThresholdRange*) data { 
    self.data = data;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self data])
    {
        [result setValue:[[self data] dictionary]forKey:@"data"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.data = [[IpCleanThresholdRange alloc]initWithDic:[dictionary objectForKey:@"data"]];
    return self;
} 

@end
  
@implementation BaseantiDescribeIpCleanThresholdRangeResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
BaseantiDescribeIpCleanThresholdRangeResult* result = [[BaseantiDescribeIpCleanThresholdRangeResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(BaseantiDescribeIpCleanThresholdRangeResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation BaseantiDescribeIpSafetyInfoResult
-(id) initWithData:(IpSafetyInfo*) data { 
    self.data = data;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self data])
    {
        [result setValue:[[self data] dictionary]forKey:@"data"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.data = [[IpSafetyInfo alloc]initWithDic:[dictionary objectForKey:@"data"]];
    return self;
} 

@end
@implementation BaseantiDescribeCcsIpResourcesResult
-(id) initWithDataList:(NSArray<IpResource*>*) dataList
        currentCount:(NSNumber*)currentCount
        totalCount:(NSNumber*)totalCount
        totalPage:(NSNumber*)totalPage { 
    self.dataList = dataList;               
    self.currentCount = currentCount;               
    self.totalCount = totalCount;               
    self.totalPage = totalPage;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self dataList])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self dataList] count]; i++) {
            IpResource* item = [[self dataList] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"dataList"];
    }
    if([self currentCount])
    {
        [result setValue:[self currentCount] forKey:@"currentCount"];
    }
    if([self totalCount])
    {
        [result setValue:[self totalCount] forKey:@"totalCount"];
    }
    if([self totalPage])
    {
        [result setValue:[self totalPage] forKey:@"totalPage"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* dataListArray = [dictionary objectForKey:@"dataList"];
    if(dataListArray&&![dataListArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [dataListArray count];i++)
        {
        IpResource* item = [[IpResource alloc]initWithDic:[dataListArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.dataList = propertyArray;
    }
    self.currentCount = [dictionary objectForKey:@"currentCount"];
    self.totalCount = [dictionary objectForKey:@"totalCount"];
    self.totalPage = [dictionary objectForKey:@"totalPage"];
    return self;
} 

@end
  
@implementation BaseantiDescribeCcsIpResourcesResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
BaseantiDescribeCcsIpResourcesResult* result = [[BaseantiDescribeCcsIpResourcesResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(BaseantiDescribeCcsIpResourcesResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation BaseantiDescribeIpResourceProtectInfoResult
-(id) initWithDataList:(NSArray<IpResourceProtectInfo*>*) dataList { 
    self.dataList = dataList;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self dataList])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self dataList] count]; i++) {
            IpResourceProtectInfo* item = [[self dataList] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"dataList"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* dataListArray = [dictionary objectForKey:@"dataList"];
    if(dataListArray&&![dataListArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [dataListArray count];i++)
        {
        IpResourceProtectInfo* item = [[IpResourceProtectInfo alloc]initWithDic:[dataListArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.dataList = propertyArray;
    }
    return self;
} 

@end
@implementation BaseantiSetCleanThresholdRequest
-(id) initWithRegion:(NSString *)regionId
cleanThresholdSpec:(CleanThresholdSpec*)cleanThresholdSpec
ip:(NSString*)ip { 
    self.regionId = regionId;
    self.cleanThresholdSpec = cleanThresholdSpec;
    self.ip = ip;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
cleanThresholdSpec:(CleanThresholdSpec*)cleanThresholdSpec
ip:(NSString*)ip { 
    self.regionId = regionId;
    self.version = version;
    self.cleanThresholdSpec = cleanThresholdSpec;
    self.ip = ip;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self cleanThresholdSpec])
    {
        [result setValue:[[self cleanThresholdSpec] dictionary]forKey:@"cleanThresholdSpec"];
    }
    if([self ip])
    {
        [result setValue:[self ip] forKey:@"ip"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.cleanThresholdSpec = [[CleanThresholdSpec alloc]initWithDic:[dictionary objectForKey:@"cleanThresholdSpec"]];
    self.ip = [dictionary objectForKey:@"ip"];
    return self;
} 

@end
  
@implementation BaseantiDescribeIpResourceProtectInfoResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
BaseantiDescribeIpResourceProtectInfoResult* result = [[BaseantiDescribeIpResourceProtectInfoResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(BaseantiDescribeIpResourceProtectInfoResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation BaseantiDescribeIpSafetyInfoResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
BaseantiDescribeIpSafetyInfoResult* result = [[BaseantiDescribeIpSafetyInfoResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(BaseantiDescribeIpSafetyInfoResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation BaseantiDescribeIpResourcesResult
-(id) initWithDataList:(NSArray<IpResource*>*) dataList
        totalCount:(NSNumber*)totalCount { 
    self.dataList = dataList;               
    self.totalCount = totalCount;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self dataList])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self dataList] count]; i++) {
            IpResource* item = [[self dataList] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"dataList"];
    }
    if([self totalCount])
    {
        [result setValue:[self totalCount] forKey:@"totalCount"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* dataListArray = [dictionary objectForKey:@"dataList"];
    if(dataListArray&&![dataListArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [dataListArray count];i++)
        {
        IpResource* item = [[IpResource alloc]initWithDic:[dataListArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.dataList = propertyArray;
    }
    self.totalCount = [dictionary objectForKey:@"totalCount"];
    return self;
} 

@end
  
@implementation BaseantiDescribeIpResourcesResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
BaseantiDescribeIpResourcesResult* result = [[BaseantiDescribeIpResourcesResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(BaseantiDescribeIpResourcesResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation BaseantiSetIpCleanThresholdRequest
-(id) initWithRegion:(NSString *)regionId
ipCleanThresholdSpec:(IpCleanThresholdSpec*)ipCleanThresholdSpec { 
    self.regionId = regionId;
    self.ipCleanThresholdSpec = ipCleanThresholdSpec;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
ipCleanThresholdSpec:(IpCleanThresholdSpec*)ipCleanThresholdSpec { 
    self.regionId = regionId;
    self.version = version;
    self.ipCleanThresholdSpec = ipCleanThresholdSpec;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self ipCleanThresholdSpec])
    {
        [result setValue:[[self ipCleanThresholdSpec] dictionary]forKey:@"ipCleanThresholdSpec"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.ipCleanThresholdSpec = [[IpCleanThresholdSpec alloc]initWithDic:[dictionary objectForKey:@"ipCleanThresholdSpec"]];
    return self;
} 

@end
@implementation BaseantiDescribeElasticIpResourcesResult
-(id) initWithDataList:(NSArray<IpResource*>*) dataList
        currentCount:(NSNumber*)currentCount
        totalCount:(NSNumber*)totalCount
        totalPage:(NSNumber*)totalPage { 
    self.dataList = dataList;               
    self.currentCount = currentCount;               
    self.totalCount = totalCount;               
    self.totalPage = totalPage;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self dataList])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self dataList] count]; i++) {
            IpResource* item = [[self dataList] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"dataList"];
    }
    if([self currentCount])
    {
        [result setValue:[self currentCount] forKey:@"currentCount"];
    }
    if([self totalCount])
    {
        [result setValue:[self totalCount] forKey:@"totalCount"];
    }
    if([self totalPage])
    {
        [result setValue:[self totalPage] forKey:@"totalPage"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* dataListArray = [dictionary objectForKey:@"dataList"];
    if(dataListArray&&![dataListArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [dataListArray count];i++)
        {
        IpResource* item = [[IpResource alloc]initWithDic:[dataListArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.dataList = propertyArray;
    }
    self.currentCount = [dictionary objectForKey:@"currentCount"];
    self.totalCount = [dictionary objectForKey:@"totalCount"];
    self.totalPage = [dictionary objectForKey:@"totalPage"];
    return self;
} 

@end
@implementation BaseantiDescribeIpResourceInfoResult
-(id) initWithData:(IpResourceInfo*) data { 
    self.data = data;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self data])
    {
        [result setValue:[[self data] dictionary]forKey:@"data"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.data = [[IpResourceInfo alloc]initWithDic:[dictionary objectForKey:@"data"]];
    return self;
} 

@end
  
@implementation BaseantiDescribeElasticIpResourcesResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
BaseantiDescribeElasticIpResourcesResult* result = [[BaseantiDescribeElasticIpResourcesResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(BaseantiDescribeElasticIpResourcesResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation BaseantiDescribeIpResourceInfoResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
BaseantiDescribeIpResourceInfoResult* result = [[BaseantiDescribeIpResourceInfoResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(BaseantiDescribeIpResourceInfoResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation BaseantiDescribeAttackStatisticsResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
BaseantiDescribeAttackStatisticsResult* result = [[BaseantiDescribeAttackStatisticsResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(BaseantiDescribeAttackStatisticsResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation BaseantiDescribeAttackTypeCountResult
-(id) initWithDataList:(NSArray<AttackTypeCount*>*) dataList { 
    self.dataList = dataList;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self dataList])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self dataList] count]; i++) {
            AttackTypeCount* item = [[self dataList] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"dataList"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* dataListArray = [dictionary objectForKey:@"dataList"];
    if(dataListArray&&![dataListArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [dataListArray count];i++)
        {
        AttackTypeCount* item = [[AttackTypeCount alloc]initWithDic:[dataListArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.dataList = propertyArray;
    }
    return self;
} 

@end
@implementation BaseantiDescribeIpMonitorFlowResult
-(id) initWithBps:(IpResourceFlow*) bps
        pps:(IpResourceFlow*)pps { 
    self.bps = bps;               
    self.pps = pps;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self bps])
    {
        [result setValue:[[self bps] dictionary]forKey:@"bps"];
    }
    if([self pps])
    {
        [result setValue:[[self pps] dictionary]forKey:@"pps"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.bps = [[IpResourceFlow alloc]initWithDic:[dictionary objectForKey:@"bps"]];
    self.pps = [[IpResourceFlow alloc]initWithDic:[dictionary objectForKey:@"pps"]];
    return self;
} 

@end
  
@implementation BaseantiDescribeIpMonitorFlowResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
BaseantiDescribeIpMonitorFlowResult* result = [[BaseantiDescribeIpMonitorFlowResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(BaseantiDescribeIpMonitorFlowResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation BaseantiDescribeAttackLogsResult
-(id) initWithDataList:(NSArray<AttackLog*>*) dataList
        currentCount:(NSNumber*)currentCount
        totalCount:(NSNumber*)totalCount
        totalPage:(NSNumber*)totalPage { 
    self.dataList = dataList;               
    self.currentCount = currentCount;               
    self.totalCount = totalCount;               
    self.totalPage = totalPage;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self dataList])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self dataList] count]; i++) {
            AttackLog* item = [[self dataList] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"dataList"];
    }
    if([self currentCount])
    {
        [result setValue:[self currentCount] forKey:@"currentCount"];
    }
    if([self totalCount])
    {
        [result setValue:[self totalCount] forKey:@"totalCount"];
    }
    if([self totalPage])
    {
        [result setValue:[self totalPage] forKey:@"totalPage"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* dataListArray = [dictionary objectForKey:@"dataList"];
    if(dataListArray&&![dataListArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [dataListArray count];i++)
        {
        AttackLog* item = [[AttackLog alloc]initWithDic:[dataListArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.dataList = propertyArray;
    }
    self.currentCount = [dictionary objectForKey:@"currentCount"];
    self.totalCount = [dictionary objectForKey:@"totalCount"];
    self.totalPage = [dictionary objectForKey:@"totalPage"];
    return self;
} 

@end
  
@implementation BaseantiDescribeAttackLogsResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
BaseantiDescribeAttackLogsResult* result = [[BaseantiDescribeAttackLogsResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(BaseantiDescribeAttackLogsResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation BaseantiDescribeAttackTypeCountResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
BaseantiDescribeAttackTypeCountResult* result = [[BaseantiDescribeAttackTypeCountResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(BaseantiDescribeAttackTypeCountResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
 
